<ion-view view-title={{moduleTitle}}>
	<ion-nav-buttons side="left">
		<a class="button button-icon ion-arrow-left-c" href="#/tabs/main"></a>
	</ion-nav-buttons>
	<ion-nav-buttons side="right">
		<button class="button button-icon ion-ios-trash" ng-click="toggleDelete()">
		</button>
		<button class="button button-icon ion-navicon" ng-click="toggleRight()" ng-hide="$exposeAside.active"></button>
	</ion-nav-buttons>

	<ion-side-menus>
		<div class="tabs-striped tabs-top">
			<div class="tabs">
				<a ng-if="access.list" ng-class="{'tab-item':true,'active': true }" href="#/{{moduleName}}/list">查看</a>
				<a ng-if="access.add" ng-class="{'tab-item':true,'active': false }" href="#/{{moduleName}}/0">添加</a>
				<a ng-if="access.stats" ng-class="{'tab-item':true,'active': false }" href="#/{{moduleName}}/stats">统计</a>
			</div>
		</div>
		<ion-side-menu-content>
			<ion-content class="padding has-tabs-top">
				<ion-refresher pulling-text="下拉刷新" pulling-icon="ion-loading-c" refreshing-text="刷新成功" refreshing-icon="ion-loading-c" on-refresh="loadList(true)">
				</ion-refresher>
				<ion-list class="list" show-delete="showDelete">
					<ion-item ng-repeat="item in stockInfoList | orderObjectById:'stock_info_id':true" href="#/{{moduleName}}/{{item.stock_info_id}}">
						<!--{{item.stock_info_id}}-->
						<span id="time">{{item.year}}-{{item.month}}</span>
						<h2>{{item.distributor_name}}</h2>
						<p>化肥品种：{{item.variety_name}}</p>

						<ion-delete-button class="ion-minus-circled" ng-click="onItemDelete(item)">
						</ion-delete-button>
					</ion-item>

					<div ng-if="listEnd" class="text-center">
						已显示所有数据
					</div>
				</ion-list>
				<ion-infinite-scroll ng-if="!listEnd" on-infinite="loadList(false)" distance="1%"></ion-infinite-scroll>
			</ion-content>
		</ion-side-menu-content>

		<ion-side-menu expose-aside-when="large" side="right">
			<ion-content class="has-tabs-top">
				<div class="list">

					<insert-address addressoption="addressOption"></insert-address>
					<insert-date dateoption="dateOption"></insert-date>

					<button class="button button-block button-positive" ng-click="filterList()">
						筛选
					</button>
				</div>
			</ion-content>
		</ion-side-menu>

	</ion-side-menus>
</ion-view>